home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
lisp
/
eulisp
/
mpfeel.lha
/
MPFeel
/
Makefile
< prev
next >
Wrap
Makefile
|
1992-10-07
|
9KB
|
308 lines
###################################################################### #
# The FEEL makefile... #
# ###################################################################### #
#
# $Id: Makefile,v 1.6 1992/02/11 19:50:01 pab Exp $
#
# $Log: Makefile,v $
# Revision 1.6 1992/02/11 19:50:01 pab
# bytecode junk
#
# Revision 1.5 1992/01/21 22:53:41 pab
# added depend rule
#
# Revision 1.4 1992/01/09 23:08:00 pab
# Std Version
#
# Revision 1.3 1991/12/22 15:13:44 pab
# Xmas revision
#
# Revision 1.2 1991/11/15 16:51:59 pab
# new version
#
# Revision 1.1 1991/08/12 16:51:05 pab
# Initial revision
#
# Revision 1.7 1991/05/16 11:22:04 pab
# 'C' garbage collector support
#
# Revision 1.6 1991/05/15 20:05:52 kjp
# Various including /brad_export->/denton_export + hooks for building
# a FEEL including compiled lisp.
#
# Revision 1.5 1991/02/13 21:13:56 kjp
# Added rule for making a profiled version of you.
#
#
# Edit the following for your favourite machine.
# Currently we know about clippers, sun3s, sun4s & MIPS R2000s.
# ###################################################################### #
# Customisation section... #
# ###################################################################### #
# Directories...
# Where the system lives (change this!)
#BASE = /net/brad/denton_export/denton/You
BASE = /u0/comp/sm/MPFeel
# C compiler configuration... -DWITH_FUDGE -DWITH_PARANOIA
# Options...
#
# Socketry...
# WITH_SYSTEMV_SOCKETS - System V IP communication
# WITH_BSD_SOCKETS - BSD IP communication
#
# Signals...
# WITH_SYSTEMV_SIGNALS - System V signalling
# WITH_BSD_SIGNALS - BSD signalling
# -DWITH_SYSTEMV_SOCKETS
### # # ###### ####### ###### ####### # # # #######
# ## ## # # # # # # # # # ## # #
# # # # # # # # # # # # # # # # # #
# # # # ###### # # ###### # # # # # # #
# # # # # # # # # ####### # # # #
# # # # # # # # # # # # ## #
### # # # ####### # # # # # # # #
# Hi to the poor souls trying to build this MasPar EuLisp for their own
# computers. In theory life should be a lot easier for you than it was for
# us. EuLisp is written in ANSI C. However on the old MAsPar's with a
# a VaxStation front end there was no ANSI compiler. SO we ported gcc and
# persuaded the maspar linker mp_ld to link the gcc objects and mpl objects
# together. This meant extracting files from the gcc libraries and things.
# However the VaxStation front ends are diminishing resource and
# if you're lucky you should have a DECstation front end which has
# the ANSI compiler based on GCC. So you will not have the same problem
# with the EuLisp code. You may have trouble with the mpl code as it is
# written in the old KNR mpl and probably won't compile.
# All the extension code is in the subdirectory Plurals
PLURALS = /u0/comp/sm/Plurals
# These are gcc options, I guess you probably won't need them
# -fstrength-reduce -fdelayed-branch -finline-functions are bad ideas
OPTS= -mg -O -DNODEBUG #-gstabs
# Have to look for header files in both directories
MP_FLAGS = -I. -IPlurals
FLAGS = ${OPTS} ${MP_FLAGS} -DWITH_FUDGE \
-DDONT_HAVE_STDLIB_H -DNOLOWTAGINTS
# -DWITH_NOBBLING
# -DGNUREADLINE
CC = gcc
LN = mpl_cc -Zq
LIBS = -lmg -lX11
# /opt/home/is/bash-1.05/readline/libreadline.a
# -lcurses -ltermlib -ltermcap
LEX = flex
YACC = bison -y -t
# Architecture and machine type...
MACHINE = ANY
ARCH = vax
# Local module path
MODULE_PATH = ${BASE}/Modules/
# Semaphoring...
SEMAPHORES = SOFTWARE
# Do the business...
# ###################################################################### #
# Working section... #
# ###################################################################### #
LOAD_PATH_NAME = FEEL_LOAD_PATH
MACHINEABBREV = ${ARCH}
DATE = `date`
# Reader specific sources...
READERSOURCES = lex.yy.c #y.tab.c alloca.c
READEROBJECTS = lex.yy.o y.tab.o #alloca.o
# Default Elvira sources...
ELVIRASOURCES = #initelv.c
ELVIRAOBJECTS = initelv.o
# Garbage collector sources
GCOBJECTS = ../CGC/gc.o remalloc.o
# Main sources...
#SOURCES = copy.c main.c
SOURCES = copyalloc.c copy.c arith.c basic.c chars.c error.c \
main.c modules.c print.c read.c set.c streams.c \
table.c vectors.c bootstrap.c lists.c listops.c \
class.c slots.c ngenerics.c \
symboot.c modboot.c toplevel.c root.c specials.c \
calls.c ccc.c macros.c system.c semaphores.c state.c \
format.c sockets.c sio.c modops.c lamport.c bitvecs.c
OBJECTS = copyalloc.o copy.o arith.o basic.o chars.o error.o \
main.o modules.o print.o read.o set.o streams.o \
table.o vectors.o bootstrap.o lists.o listops.o \
class.o slots.o ngenerics.o \
symboot.o modboot.o toplevel.o root.o specials.o \
calls.o ccc.o macros.o system.o semaphores.o state.o \
format.o sockets.o sio.o modops.o lamport.o bitvecs.o #__main.o foo.o
HDRS = bootstrap.h generics.h modules.h specials.h toplevel.h \
calls.h global.h ngenerics.h state.h vectors.h \
ccc.h lamport.h objects.h structs.h version.h \
class.h lex_global.h root.h symboot.h y.tab.h \
copy.h listops.h runtime.h syssockets.h \
defs.h lists.h semaphores.h system_p.h \
error.h macros.h sio.h system_t.h sockets.h \
format.h modboot.h slots.h table.h threads.h
COSOURCES = ${MACHINEABBREV}-switch.s
COOBJECTS = ${MACHINEABBREV}-switch.o threads.o
DISTRIBCO = sun3-switch.s sun4-switch.s ard-switch.s clip-switch.s any-switch.s i860-switch.s \
Makefile
KERNELLISP= defs.em extras0.em initcode.em macros0.em standard0.em
# MasPar files
# These libraries are built in the Plurals directory.
MP_LIBS = Plurals/eubang.a #Plurals/Random/random.a
MP_SOURCES = Plurals/eubang.c Plurals/visualise.c
MP_OBJECTS = Plurals/eubang.o Plurals/visualise.o
MP_HEADERS = Plurals/mp_eubang.h Plurals/mp_arith.h Plurals/mp_type.h \
Plurals/constant.h
# Lisp object file
LISPOBJECTS = LispSrc/all-lisp.o
#ISOURCES = interpreter.c
#IOBJECTS = interp.o
# Lisp object file
LISPOBJECTS = LispSrc/all-lisp.o
you: ${OBJECTS} ${COOBJECTS} ${READEROBJECTS} ${ELVIRAOBJECTS} ${IOBJECTS} \
${MP_LIBS} ${MP_OBJECTS}
-touch you
rm you
${LN} -yinitialise_readstr -o you ${OBJECTS} ${COOBJECTS} \
${MP_OBJECTS} ${READEROBJECTS} ${IOBJECTS} ${ELVIRAOBJECTS} \
${MP_LIBS} ${LIBS}
mplimit -Zq you pmem $(PMEM_SIZE)
mplimit -Zq you cmem $(CMEM_SIZE)
echo "#!/bin/sh" > mpfeel
echo FEEL_LOAD_PATH=.:$(BASE)/Modules:$(BASE)/Plurals/Modules >> mpfeel
echo "export FEEL_LOAD_PATH" >> mpfeel
echo $(BASE)/you "$*" >> mpfeel
chmod u+x mpfeel
echo
MPFeel.tar.Z:
-cd ..
Plurals.tar.Z:
-tar cvf Plurals.tar Plurals/READ* Plurals/Build* Plurals/Makefile Plurals/*.[mch] Plurals/Random/Makefile Plurals/Random/*.[mh] Plurals/*.emc Plurals/Modules/*.em Plurals/header Plurals/f_head
-compress Plurals.tar
-zcat Plurals.tar.Z | tar tvf -
proyou: ${OBJECTS} ${COOBJECTS} ${READEROBJECTS} ${ELVIRAOBJECTS}
${CC} -p -o proyou ${OBJECTS} ${COOBJECTS} \
${READEROBJECTS} ${ELVIRAOBJECTS} ${LIBS}
echo
elvira: ${OBJECTS} ${COOBJECTS} ${READEROBJECTS}
ld -r -o feel_elvira.o ${OBJECTS} ${COOBJECTS} ${READEROBJECTS}
echo
feel_elvira.o: elvira
feel: feel_elvira.o ${LISPOBJECTS}
(cd LispSrc; make all-lisp.o)
ecc -o feel ${LISPOBJECTS}
echo
reader:
${LEX} comp.lex
${YACC} test.yac
# Sicko bytecode hacking
# preprocess explicitly, then compile the result, after stripping out
# cpp control codes. Ugh. Makes debugging easier though.
interp.o: interpret.c bytecodes.h interpret.h
${CC} -E interpret.c ${FLAGS} \
-DMACHINE_${MACHINE} \
-DMODULE_PATH=\"${MODULE_PATH}\" \
-DLOAD_PATH_NAME=\"${LOAD_PATH_NAME}\" \
-DSEMAPHORES_${SEMAPHORES} \
-DMAKE_DATE="\"${DATE}\"" \
| grep -v "^#" | sed -e 's/@@/ \
/g' > interp.c
${CC} -c ${FLAGS} interp.c
.c.o:
${CC} -c $< -o $*.o ${FLAGS} \
-DMACHINE_${MACHINE} \
-DMODULE_PATH=\"${MODULE_PATH}\" \
-DLOAD_PATH_NAME=\"${LOAD_PATH_NAME}\" \
-DSEMAPHORES_${SEMAPHORES} \
-DMAKE_DATE="\"${DATE}\""
version: ${SOURCES} ${COSOURCES} ${READERSOURCES} ${ELVIRASOURCES} ${DISTRIBCO} ${HDRS} ${KERNELLISP}
rcsfreeze
tar: ${SOURCES} ${COSOURCES} ${READERSOURCES} ${ELVIRASOURCES} ${DISTRIBCO} ${HDRS} ${KERNELLISP}
tar chf - ${SOURCES} ${COSOURCES} ${READERSOURCES} ${ELVIRASOURCES} ${DISTRIBCO} ${HDRS} ${KERNELLISP} \
| compress > you.tar.Z
#Rather assumes that you have X...
depend: ${SOURCES} ${HDRS} ${READERSOURCES} ${COSOURCES}
makedepend -s "# DO NOT DELETE THIS LINE" -- ${FLAGS} -- ${SOURCES} ${C OSOURCES}
clean:
rm ${OBJECTS} ${COOBJECTS} ${READEROBJECTS} you
${MACHINE}-coroutine.o: ${MACHINE}-coroutine.s
${CC} -c ${MACHINE}-coroutine.s
# DO NOT DELETE THIS LINE